use Dosvid
go

if exists(select 1
		  from sysobjects
		  where name = 'Candidate_Positions')
  drop table Candidate_Positions
go

create table Candidate_Positions
(
  Id int identity(1,1) not null,
  CandidateId int not null,
  PositionId int not null
)  
go

alter table Candidate_Positions add constraint PK_Candidate_Positions_ID primary key(Id)
go

create nonclustered index IX_Candidate_Positions_CandidateId on Candidate_Positions
       (CandidateId asc)
go

alter table Candidate_Positions add constraint FK_Candidate_Positions_Positions_PositionId 
      foreign key (PositionId) references Positions(Id) 
go

alter table Candidate_Positions add constraint FK_Candidate_Positions_Candidates_CandidateId 
      foreign key (CandidateId) references Candidates(Id) 
go

